import { observable, computed, action } from "mobx";

class Store {
  @observable nickname = '';
  @observable username = '';
  @observable authorized = false;

  @action setNickname(nickname) {
    this.nickname = nickname;
  }

  @action setUsername(username) {
    this.username = username;
  }

  @action setAuthorized(authorized) {
    this.authorized = authorized;
  }
  
  @action checkSession() {
    //TODO: 后台校验回话有效性
  }
}

export default new Store();
